<html>
<head><meta charset="utf-8"><title>crate `core` compiled by an incompatible version of rustc · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html">crate `core` compiled by an incompatible version of rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="219294305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294305">(Dec 09 2020 at 03:32)</a>:</h4>
<p>I'm getting this error when compiling rustc:</p>
<div class="codehilite"><pre><span></span><code>error[E0514]: found crate `core` compiled by an incompatible version of rustc
 --&gt; library/rustc-std-workspace-core/lib.rs:4:9
  |
4 | pub use core::*;
  |         ^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.50.0-dev)
  = note: the following crate versions were found:
          crate `core` compiled by : /home/tgnottingham/Projects/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-3592da2190bb8b9a.rmeta
</code></pre></div>
<p>I've removed the build directory and retried to no avail. I did make changes to the standard library, but commenting them out doesn't fix the problem. It's painful trying to figure out what change is causing it, because the build takes so long before it fails. Anyone familiar with this error and what might be causing it?</p>



<a name="219294689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294689">(Dec 09 2020 at 03:41)</a>:</h4>
<p><span class="user-mention" data-user-id="306073">@Tyson Nottingham</span> what command are you running?</p>



<a name="219294698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294698">(Dec 09 2020 at 03:41)</a>:</h4>
<p><code>./x.py build -i -j4 library/std</code></p>



<a name="219294712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294712">(Dec 09 2020 at 03:41)</a>:</h4>
<p>hmm, and you haven't made any changes to bootstrap? that's weird</p>



<a name="219294763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294763">(Dec 09 2020 at 03:42)</a>:</h4>
<p>does <code>rm -r build/x86_64-unknown-linux-gnu/stage1-std/</code> help? (that will only take a minute or two to recompile)</p>



<a name="219294848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294848">(Dec 09 2020 at 03:44)</a>:</h4>
<p>Dang, just started another build. I suspect it won't help since deleting the entire build dir doesn't, but I'll try.</p>



<a name="219294870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294870">(Dec 09 2020 at 03:44)</a>:</h4>
<p>What change did you make to the standard library?</p>



<a name="219294889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294889">(Dec 09 2020 at 03:45)</a>:</h4>
<p>Oh, it's not that, as it reproduces even if I roll them back completely.</p>



<a name="219294892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294892">(Dec 09 2020 at 03:45)</a>:</h4>
<p>Also, if you're only changing libstd and not rustc you don't need to compile the compiler</p>



<a name="219294895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294895">(Dec 09 2020 at 03:45)</a>:</h4>
<p>--stage 0</p>



<a name="219294913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219294913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219294913">(Dec 09 2020 at 03:45)</a>:</h4>
<p>I am changing incr-comp serialization code, so maybe I'm introducing a bug that manifests this way. I'll try building without incremental.</p>



<a name="219295003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219295003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219295003">(Dec 09 2020 at 03:47)</a>:</h4>
<p>Ah ok, that's probably it then</p>



<a name="219295016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219295016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219295016">(Dec 09 2020 at 03:47)</a>:</h4>
<p>You can't reuse the incremental cache from two different ABIs</p>



<a name="219295162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219295162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219295162">(Dec 09 2020 at 03:50)</a>:</h4>
<p>Okay, that makes some sense. Btw, is <code>incremental = true</code> in config.toml roughly the same as specifying <code>-i</code> to <code>x.py</code>?</p>



<a name="219295963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219295963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219295963">(Dec 09 2020 at 04:06)</a>:</h4>
<p>Well, still hitting it with incremental turned off. Clearing the build directory to be safe and trying again...</p>



<a name="219296318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219296318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219296318">(Dec 09 2020 at 04:15)</a>:</h4>
<p>Just found a bug in my code, and I realize now it affects crate metadata serialization too, so hopefully that's it. <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="219298947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219298947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219298947">(Dec 09 2020 at 05:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="306073">Tyson Nottingham</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc/near/219295162">said</a>:</p>
<blockquote>
<p>Okay, that makes some sense. Btw, is <code>incremental = true</code> in config.toml roughly the same as specifying <code>-i</code> to <code>x.py</code>?</p>
</blockquote>
<p>To my knowledge, yes.</p>



<a name="219389257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219389257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219389257">(Dec 09 2020 at 19:55)</a>:</h4>
<p>This did turn out to be a bug in my serialization code, by the way. Thanks for the support! <span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="219389327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/crate%20%60core%60%20compiled%20by%20an%20incompatible%20version%20of%20rustc/near/219389327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/crate.20.60core.60.20compiled.20by.20an.20incompatible.20version.20of.20rustc.html#219389327">(Dec 09 2020 at 19:56)</a>:</h4>
<p>glad you found it :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>